package EX.Random;

import java.util.Random;
import java.util.Scanner;

public class ex {
    public static void main(String[] args) {
        Random random = new Random();
        Scanner update = new Scanner(System.in);
        int X = random.nextInt(100);
        while (true){
            System.out.print("请输入一个数：");
            int x = update.nextInt();
            if(x < X){
                System.out.println("输入的数小于随机数X");
            }else if(x > X){
                System.out.println("输入的数大于随机数X");
            } else if (x == X) {
                System.out.println("输入的数等于随机数X");
                break;
            }
        }
    }
}
